<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<!-- DOS Upload Utilities -->

<HTML>

<HEAD>
<TITLE>DOS Upload Utilities</TITLE>
<META HTTP-EQUIV="content-type" CONTENT="text/html; charset=iso-8859-1">
</HEAD>

<BODY BACKGROUND="spiral.gif" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#990099" ALINK="#FF0000">

<TABLE WIDTH="98%">
<TR><TD WIDTH=60 VALIGN=BOTTOM NOWRAP>
<IMG SRC="transp.gif" ALT="" WIDTH=60 HEIGHT=20>
</TD><TD>

<!-- Ab hier Seitentext: -->

<P><BIG>
<BR>
<STRONG><U>III.3 DOS Upload Utilities</U></STRONG>
</BIG></P>

<P><BIG>
The <NOBR>BOOT-51</NOBR> package for <NOBR>DOS/Windows</NOBR> contains the
utilities <NOBR><EM>COMPORT.EXE</EM></NOBR>, <NOBR><EM>RESET51.EXE</EM></NOBR>,
and <NOBR><EM>SLEEP.EXE</EM></NOBR>, which are usually invoked by
<NOBR><EM>UPLOAD.BAT</EM></NOBR>, but can also be used separately.
</BIG></P>

<P><BIG>
<STRONG><U>COMPORT</U></STRONG>
</BIG></P>

<P><BIG>
sets &lt;baudrate&gt; and data format of a PC serial &lt;port&gt;:
</BIG></P>

<P><CENTER><BIG><STRONG><CODE>
COMPORT &lt;port&gt; &lt;baudrate&gt; [&lt;parity&gt; [&lt;databits&gt; [&lt;stopbits&gt;]]]
</CODE></STRONG></BIG></CENTER></P>

<P><BIG>
Legal parameter values are:
</BIG></P>

<P>
<BLOCKQUOTE>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
<TR><TD><BIG>&lt;port&gt;:</BIG></TD>
    <TD NOWRAP>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
    <TD COLSPAN=2 NOWRAP><BIG>AUX, COM1, COM2, COM3, COM4</BIG></TD></TR>
<TR><TD><BIG>&lt;baudrate&gt;:</BIG></TD><TD>&nbsp;</TD>
    <TD COLSPAN=2 NOWRAP><BIG>1.66 &lt; baudrate &lt; 121000</BIG></TD></TR>
<TR><TD><BIG>&lt;parity&gt;:</BIG></TD><TD>&nbsp;</TD>
    <TD NOWRAP><BIG>N, O, E, M, S</BIG></TD>
    <TD NOWRAP><BIG>(default: N)</BIG></TD></TR>
<TR><TD><BIG>&lt;databits&gt;:</BIG></TD><TD>&nbsp;</TD>
    <TD NOWRAP><BIG>5, 6, 7, 8</BIG></TD>
    <TD NOWRAP><BIG>(default: 8)</BIG></TD></TR>
<TR><TD><BIG>&lt;stopbits&gt;:</BIG></TD><TD>&nbsp;</TD>
    <TD NOWRAP><BIG>1, 1.5, 2</BIG></TD>
    <TD NOWRAP><BIG>(default: 1)</BIG></TD></TR>
</TABLE>
</BLOCKQUOTE>
</P>

<P><BIG>
The port names AUX and COM1 are equivalent.<BR>
<STRONG>COMPORT</STRONG> allows to set very low, very high, and very odd baudrates,
which can be generated by the 16C450 UART of the PC (and the 8051 board),
but are not supported by the PC BIOS or the <NOBR>MS-DOS</NOBR> <STRONG>MODE</STRONG>
command.<BR>
Baudrates that cannot be generated exactly are accepted as long as the
deviation doesn't exceed <NOBR>5.0 %</NOBR>. <STRONG>COMPORT</STRONG> displays the
&quot;real&quot; baudrate and the relative deviation (if any) from the
nominal value.<BR>
The parity can optionally be set to N (none), O (odd), E (even), M (mark),
or S (space). Furthermore, the data format can be set to 5, 6, 7, or 8
data bits, and 1, <NOBR>1.5</NOBR>, or 2 stop bits.<BR>
Default settings are: no parity, 8 data bits and 1 stop bit.
</BIG></P>

<P>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
<TR><TD VALIGN=TOP><BIG>Note:</BIG></TD>
    <TD NOWRAP>&nbsp;&nbsp;&nbsp;&nbsp;</TD>
    <TD NOWRAP><BIG>only 6, 7 or 8 data bits may be combined with
               1 or 2 stop bits.<BR>5 data bits are only possible
               with <NOBR>1.5</NOBR> stop bits!</BIG></TD></TR>
</TABLE>
</P>

<P>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
<TR><TD NOWRAP><BIG><STRONG>Example 1:</STRONG></BIG></TD>
    <TD NOWRAP>&nbsp;&nbsp;&nbsp;&nbsp;</TD>
    <TD NOWRAP><BIG><CODE>COMPORT COM4 12800</CODE></BIG></TD></TR>
<TR><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD></TR>
<TR><TD>&nbsp;</TD><TD>&nbsp;</TD>
    <TD><BIG>Sets the serial port COM4 to 12800 Baud,
             no parity, 8 data bits, and 1 stop bit.</BIG></TD></TR>
</TABLE>
</P>

<P><BIG>
<STRONG><U>RESET51</U></STRONG>
</BIG></P>

<P><BIG>
forms a reset pulse of the duration &lt;pulsewidth&gt; at the D0 and D1 outputs
of a PC printer &lt;port&gt;, or at the DTR output of a serial &lt;port&gt;:
</BIG></P>

<P><BLOCKQUOTE><BIG><STRONG><CODE>
RESET51 &lt;port&gt; [&lt;pulsewidth&gt;]
</CODE></STRONG></BIG></BLOCKQUOTE></P>

<P>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
<TR><TD VALIGN=TOP><BIG>Legal &lt;port&gt; values are:</BIG></TD>
    <TD NOWRAP>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
    <TD NOWRAP><BIG>PRN, LPT1, LPT2, LPT3,<BR>
                    AUX, COM1, COM2, COM3, COM4,<BR>
                    NUL</BIG></TD></TR>
</TABLE>
</P>

<P><BIG>
PRN and LPT1 are equivalent, and so are AUX and COM1.<BR>
The optional parameter &lt;pulsewidth&gt; is the duration of the reset pulse in ms.<BR>
Legal values are: &nbsp;&nbsp;
1 &nbsp; &lt;= &nbsp; &lt;pulsewidth&gt; &nbsp; &lt;= &nbsp; 65535.
&nbsp;&nbsp; (default is 50)<BR>
When invoked without parameters, a help screen is displayed.<BR>
In case of error, <STRONG>RESET51</STRONG> returns the ERRORLEVEL 1, 0 otherwise.<BR>
When executed, <STRONG>RESET51</STRONG> forms a positive pulse at D0 <NOBR>(pin 2)</NOBR>,
and a negative pulse at D1 <NOBR>(pin 3)</NOBR> of a PC printer port, or a
&quot;high&quot; pulse <NOBR>(-12 V !!!)</NOBR> at the DTR output of a serial
port respectively.<BR>
If the NUL device is specified as &lt;port&gt;, <STRONG>RESET51</STRONG> delays only
for &lt;pulsewidth&gt; ms.<BR>
If the default pulse width of <NOBR>50 ms</NOBR> is too short to reset the
<NOBR>MCS-51</NOBR> board, specify a greater pulse width.
</BIG></P>

<P>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
<TR><TD NOWRAP><BIG><STRONG>Example 2:</STRONG></BIG></TD>
    <TD NOWRAP>&nbsp;&nbsp;&nbsp;&nbsp;</TD>
    <TD NOWRAP><BIG><CODE>RESET51 LPT2 500</CODE></BIG></TD></TR>
<TR><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD></TR>
<TR><TD>&nbsp;</TD><TD>&nbsp;</TD>
    <TD><BIG>Applies a reset signal to the D0 and D1 outputs
             of the printer port LPT2 for 500 ms.</BIG></TD></TR>
</TABLE>
</P>

<P><BIG>
<STRONG>RESET51</STRONG> is running under <NOBR>MS-DOS</NOBR>, and in the DOS-Boxes
of Windows <NOBR>3.1x</NOBR> and 9x.<BR>
Windows ME does no longer provide a DOS-Box.<BR>
<STRONG>RESET51</STRONG> is not running under Windows NT, 2000, and XP!
</BIG></P>

<P><BIG>
For batch file operation, a reset line is highly recommended! If you don't
have it, you will always have to press the reset button of the target system,
before invoking <NOBR><EM>BOOT.BAT</EM></NOBR>.
Since this may easily be forgotten, it is better to automate this step.
</BIG></P>

<P><BIG>
<STRONG><U>SLEEP</U></STRONG>
</BIG></P>

<P><BIG>
waits until <NOBR>BOOT-51</NOBR> has output &lt;chars&gt; characters of its
sign-on message at a given &lt;baudrate&gt;:
</BIG></P>

<P><BLOCKQUOTE><BIG><STRONG><CODE>
SLEEP &lt;baudrate&gt; [&lt;chars&gt;]
</CODE></STRONG></BIG></BLOCKQUOTE></P>

<P><BIG>
<STRONG>SLEEP</STRONG> is a simple delay program, which is waiting as long as it takes
to output &lt;chars&gt; characters with the specified &lt;baudrate&gt;.
However, <STRONG>SLEEP</STRONG> takes into account, that <NOBR>BOOT-51</NOBR> will
never send more than one character per ms, even at very high baudrates.<BR>
The default value of &lt;chars&gt; is 70, which is slightly more than the
total length of the <NOBR>BOOT-51</NOBR> sign-on message.
</BIG></P>

<P>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
<TR><TD NOWRAP><BIG><STRONG>Example 3:</STRONG></BIG></TD>
    <TD NOWRAP>&nbsp;&nbsp;&nbsp;&nbsp;</TD>
    <TD NOWRAP><BIG><CODE>SLEEP 300</CODE></BIG></TD></TR>
<TR><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD></TR>
<TR><TD>&nbsp;</TD><TD>&nbsp;</TD>
    <TD><BIG>Waits until BOOT-51 has fully output
             its sign-on message at 300 Baud.</BIG></TD></TR>
</TABLE>
</P>

<!-- Seitentext Ende -->

<P>
<BR>
<BR>
<CENTER>
<TABLE WIDTH="70%">
<TR><TH><A HREF="boot51.htm"><IMG SRC="home.gif" ALT="[contents]" BORDER=0 WIDTH=32 HEIGHT=32></A></TH>
    <TH><A HREF="boperat.htm"><IMG SRC="up.gif" ALT="[up]" BORDER=0 WIDTH=32 HEIGHT=32></A></TH>
    <TH><A HREF="bbatch.htm"><IMG SRC="back.gif" ALT="[back]" BORDER=0 WIDTH=32 HEIGHT=32></A></TH>
    <TH><A HREF="bscript.htm"><IMG SRC="next.gif" ALT="[next]" BORDER=0 WIDTH=32 HEIGHT=32></A></TH>
</TR>
</TABLE>
</CENTER>
</P>

</TD></TR>
</TABLE>

</BODY>

</HTML>
